define
(
    ["Data/DocumentService"],
    function(DocumentService)
    {
        return function()
        {
            var _docService = new DocumentService().getInstance();

            this.handleRequest = function(req, res, config)
            {
                var docId = _docService.createDocument(req.cookies['express.sid']);                
                res.redirect("/" + docId);
            }
        }        
    }
);